import http from '../http'
export const createApp = (name, avatar, type) => {
  return http.post('/api/auth/createApp', { name, avatar, type })
}
export const getApp = (page) => {
  return http.post('/api/auth/getApp',{page});
}
export const deleteApp = (AppBizId) => {
  return http.post('/api/auth/deleteApp',{AppBizId});
}
export const describeApp = (AppBizId) => {
  return http.post('/api/auth/describeApp',{AppBizId});
}
export const modifyApp = (AppBizId,BaseConfig,AppConfig) => {
  return http.post('/api/auth/modifyApp',{AppBizId,BaseConfig,AppConfig});
}
export const listModel = () => {
  return http.post('/api/auth/listModel');
}
export const createRelease = (AppBizId,Desc) => {
  return http.post('/api/auth/createRelease',{AppBizId,Desc});
}
export const describeRelease = (AppBizId) => {
  return http.post('/api/auth/describeRelease',{AppBizId});
}
export const getAppShareURL = (AppBizId) => {
  return http.post('/api/auth/getAppShareURL',{AppBizId});
}
export const uploadFiles = (formData) => {
  return http.post('/api/upload/batch',formData,{headers: {
    'Content-Type': 'multipart/form-data'
  }});
}
export const ListDoc = (appid,size,page) => {
  return http.post('/api/auth/ListDoc',{appid,size,page});
}
export const DeleteDoc = (DocBizIds,BotBizId) => {
  return http.post('/api/auth/DeleteDoc',{DocBizIds,BotBizId});
}
export const RenameDoc = (BotBizId,DocBizId,NewName) => {
  return http.post('/api/auth/RenameDoc',{BotBizId,DocBizId,NewName});
}

export const GetDocPreview = (BotBizId,DocBizId) => {
  return http.post('/api/auth/GetDocPreview',{BotBizId,DocBizId});
}